<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>考试结果分析</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    <style>
        :root {
            --primary: #4361ee;
            --primary-dark: #3a56d4;
            --secondary: #6c757d;
            --accent: #f72585;
            --success: #4cc9f0;
            --warning: #f9c74f;
            --danger: #f94144;
            --light: #f8f9fa;
            --dark: #212529;
            --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            --transition: all 0.3s ease;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            color: var(--dark);
            line-height: 1.6;
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1000px;
            margin: 0 auto;
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }

        .top-notice {
            background: linear-gradient(120deg, #e6f7ff, #bae7ff);
            border-left: 4px solid var(--primary);
            padding: 20px;
            display: flex;
            align-items: flex-start;
            gap: 15px;
        }

        .notice-icon {
            background: var(--success);
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 1.2rem;
        }

        .notice-content h3 {
            color: var(--primary);
            margin-bottom: 8px;
            font-size: 1.2rem;
        }

        .notice-content p {
            margin-bottom: 5px;
            color: #2d3748;
        }

        .result-header {
            background: linear-gradient(120deg, var(--primary), var(--primary-dark));
            color: white;
            padding: 25px;
        }

        .result-title {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 15px;
        }

        .exam-info {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            margin-bottom: 15px;
        }

        .info-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.95rem;
        }

        .status-badge {
            background: var(--success);
            color: white;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 20px;
            padding: 25px;
            background: var(--light);
        }

        .stat-card {
            background: white;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            box-shadow: var(--card-shadow);
            transition: var(--transition);
        }

        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
        }

        .stat-icon {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 15px;
            font-size: 1.5rem;
        }

        .score .stat-icon {
            background: rgba(76, 201, 240, 0.2);
            color: var(--success);
        }

        .accuracy .stat-icon {
            background: rgba(249, 199, 79, 0.2);
            color: var(--warning);
        }

        .wrong .stat-icon {
            background: rgba(249, 65, 68, 0.2);
            color: var(--danger);
        }

        .correct .stat-icon {
            background: rgba(76, 201, 240, 0.2);
            color: var(--success);
        }

        .time .stat-icon {
            background: rgba(67, 97, 238, 0.2);
            color: var(--primary);
        }

        .stat-value {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 5px;
        }

        .stat-label {
            color: var(--secondary);
            font-size: 0.9rem;
        }

        .score-detail {
            margin-top: 8px;
            font-size: 0.9rem;
            color: var(--secondary);
        }

        .action-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            padding: 0 25px 25px;
            background: var(--light);
        }

        .btn {
            padding: 12px 25px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
        }

        .btn-secondary {
            background: var(--secondary);
            color: white;
        }

        .btn-secondary:hover {
            background: #5a6268;
            transform: translateY(-2px);
        }

        .btn-success {
            background: var(--success);
            color: white;
        }

        .btn-success:hover {
            background: #3bb4d8;
            transform: translateY(-2px);
        }

        .ai-comment {
            padding: 25px;
            border-bottom: 1px solid #e9ecef;
        }

        .section-title {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.4rem;
            color: var(--primary);
            margin-bottom: 20px;
        }

        .comment-content {
            background: var(--light);
            padding: 20px;
            border-radius: 12px;
            line-height: 1.8;
            position: relative;
        }

        .comment-content:before {
            content: "";
            font-size: 5rem;
            color: rgba(67, 97, 238, 0.1);
            position: absolute;
            top: -20px;
            left: 10px;
            font-family: Georgia, serif;
        }

        .answer-details {
            padding: 25px;
        }

        .question-item {
            background: white;
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: var(--card-shadow);
            transition: var(--transition);
            border-left: 4px solid var(--success);
        }

        .question-item.wrong {
            border-left-color: var(--danger);
        }

        .question-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid #e9ecef;
        }

        .question-num {
            font-weight: 700;
            color: var(--dark);
        }

        .score {
            font-weight: 700;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.9rem;
        }

        .correct .score {
            background: rgba(76, 201, 240, 0.2);
            color: var(--success);
        }

        .wrong .score {
            background: rgba(249, 65, 68, 0.2);
            color: var(--danger);
        }

        .question-text {
            font-weight: 600;
            margin-bottom: 15px;
        }

        .options {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 10px;
            margin-bottom: 15px;
        }

        .option {
            padding: 10px 15px;
            border-radius: 8px;
            background: #f8f9fa;
            border: 1px solid #e9ecef;
        }

        .option.correct-answer {
            background: rgba(76, 201, 240, 0.1);
            border-color: var(--success);
        }

        .option.user-answer {
            background: rgba(249, 65, 68, 0.1);
            border-color: var(--danger);
        }

        .option.correct-answer.user-answer {
            background: rgba(76, 201, 240, 0.2);
            border-color: var(--success);
        }

        .answer-info {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px dashed #e9ecef;
        }

        .answer-item {
            padding: 10px 15px;
            border-radius: 8px;
            background: #f8f9fa;
        }

        .answer-item p:first-child {
            font-weight: 600;
            margin-bottom: 5px;
            color: var(--secondary);
            font-size: 0.9rem;
        }

        @media (max-width: 768px) {
            .stats-container {
                grid-template-columns: repeat(2, 1fr);
            }

            .action-buttons {
                flex-direction: column;
            }

            .btn {
                width: 100%;
                justify-content: center;
            }

            .answer-info {
                grid-template-columns: 1fr;
            }

            .exam-info {
                flex-direction: column;
                gap: 10px;
            }
        }

        .floating-buttons {
            position: fixed;
            bottom: 20px;
            right: 20px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .floating-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
            transition: var(--transition);
            border: none;
            font-size: 1.2rem;
        }

        .floating-btn:hover {
            background: var(--primary-dark);
            transform: translateY(-3px);
        }
    </style>
</head>

<body>
    <div class="container">
        <!-- 顶部通知栏 -->
        <div class="top-notice">
            <div class="notice-icon">
                <i class="fas fa-check"></i>
            </div>
            <div class="notice-content">
                <h3>考试已完成</h3>
                <p>您的答案已提交成功并完成批改，查看下方为您生成的分析内容。</p>
                <p>考试成绩未达合格线，建议您点击"重考"按钮，前往学习后参加补考考试。</p>
            </div>
        </div>

        <!-- 结果头部 -->
        <div class="result-header">
            <h1 class="result-title">考试结果分析</h1>
            <div class="exam-info">
                <div class="info-item">
                    <i class="fas fa-book"></i>
                    <span>试卷名称：尚硅谷编程联盟星球第一期《计算机科学导论》测试卷</span>
                </div>
                <div class="info-item">
                    <i class="fas fa-user"></i>
                    <span>考生姓名：学思星</span>
                </div>
                <div class="info-item">
                    <i class="fas fa-clock"></i>
                    <span>考试时间：2025-09-06 18:38:48</span>
                </div>
            </div>
            <div class="status-badge">
                <i class="fas fa-check-circle"></i>
                <span>已完成</span>
            </div>
        </div>

        <!-- 统计卡片区 -->
        <div class="stats-container">
            <div class="stat-card score">
                <div class="stat-icon">
                    <i class="fas fa-star"></i>
                </div>
                <div class="stat-value">36</div>
                <div class="stat-label">考试成绩</div>
                <div class="score-detail">满分: 100分</div>
            </div>

            <div class="stat-card accuracy">
                <div class="stat-icon">
                    <i class="fas fa-chart-line"></i>
                </div>
                <div class="stat-value">33%</div>
                <div class="stat-label">得分率</div>
            </div>

            <div class="stat-card wrong">
                <div class="stat-icon">
                    <i class="fas fa-times-circle"></i>
                </div>
                <div class="stat-value">21</div>
                <div class="stat-label">错误题数</div>
            </div>

            <div class="stat-card correct">
                <div class="stat-icon">
                    <i class="fas fa-check-circle"></i>
                </div>
                <div class="stat-value">12</div>
                <div class="stat-label">正确题数</div>
            </div>

            <div class="stat-card time">
                <div class="stat-icon">
                    <i class="fas fa-stopwatch"></i>
                </div>
                <div class="stat-value">3</div>
                <div class="stat-label">用时(分钟)</div>
            </div>
        </div>

        <!-- 操作按钮 -->
        <div class="action-buttons">
            <button class="btn btn-primary">
                <i class="fas fa-home"></i>
                <span>返回首页</span>
            </button>
            <button class="btn btn-secondary">
                <i class="fas fa-redo"></i>
                <span>重考列表</span>
            </button>
            <button class="btn btn-success">
                <i class="fas fa-download"></i>
                <span>下载成绩单</span>
            </button>
        </div>

        <!-- AI 试卷点评 -->
        <div class="ai-comment">
            <h2 class="section-title">
                <i class="fas fa-robot"></i>
                <span>AI 试卷点评</span>
            </h2>
            <div class="comment-content">
                <p>本次考试成绩显示，你对部分概念已学习，但对于代码题、实践题存在较多知识漏洞。整体来看还没有形成完整的知识体系，仍停留在零散知识点阶段。建议多做练习题，巩固知识体系，同时做好学习笔记，定期复习与总结，以提高学习效率，保持积极态度，相信通过努力可以取得更好的成绩！加油！
                </p>
            </div>
        </div>

        <!-- 答题详情 -->
        <div class="answer-details">
            <h2 class="section-title">
                <i class="fas fa-list-alt"></i>
                <span>答题详情</span>
            </h2>

            <!-- 第1题 -->
            <div class="question-item correct">
                <div class="question-header">
                    <span class="question-num">第1题</span>
                    <span class="score">3 / 3分</span>
                </div>
                <div class="question-text">
                    在计算机科学导论第四版第二章中，二进制数01001对应的十进制数是多少？
                </div>
                <div class="options">
                    <div class="option">A. 5</div>
                    <div class="option">B. 8</div>
                    <div class="option correct-answer user-answer">C. 9</div>
                    <div class="option">D. 10</div>
                </div>
                <div class="answer-info">
                    <div class="answer-item">
                        <p>你的答案</p>
                        <p>C. 9</p>
                    </div>
                    <div class="answer-item">
                        <p>标准答案</p>
                        <p>C. 9</p>
                    </div>
                </div>
            </div>

            <!-- 第2题 -->
            <div class="question-item wrong">
                <div class="question-header">
                    <span class="question-num">第2题</span>
                    <span class="score">0 / 3分</span>
                </div>
                <div class="question-text">
                    关于数据编码，以下哪些说法是正确的？（多选）
                </div>
                <div class="options">
                    <div class="option user-answer">A. ASCII码使用8位编码表示字符</div>
                    <div class="option correct-answer user-answer">B. ASCII码使用7位编码表示字符</div>
                    <div class="option correct-answer">C. UTF-8编码可以表示所有Unicode字符</div>
                    <div class="option">D. UTF-16编码最多需要2个字节表示一个字符</div>
                    <div class="option correct-answer">E. UTF-32编码使用固定32位表示字符</div>
                </div>
                <div class="answer-info">
                    <div class="answer-item">
                        <p>你的答案</p>
                        <p>A, B</p>
                    </div>
                    <div class="answer-item">
                        <p>标准答案</p>
                        <p>B, C, E</p>
                    </div>
                </div>
            </div>

            <!-- 第3题 -->
            <div class="question-item wrong">
                <div class="question-header">
                    <span class="question-num">第3题</span>
                    <span class="score">0 / 3分</span>
                </div>
                <div class="question-text">
                    以下哪些存储设备属于外部存储设备？（多选）
                </div>
                <div class="options">
                    <div class="option user-answer">A. SSD</div>
                    <div class="option user-answer">B. HDD</div>
                    <div class="option correct-answer user-answer">C. U盘</div>
                    <div class="option correct-answer">D. 光盘</div>
                    <div class="option correct-answer">E. 移动硬盘</div>
                </div>
                <div class="answer-info">
                    <div class="answer-item">
                        <p>你的答案</p>
                        <p>A, B, C, D</p>
                    </div>
                    <div class="answer-item">
                        <p>标准答案</p>
                        <p>C, D, E</p>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 浮动按钮 -->
    <div class="floating-buttons">
        <button class="floating-btn" onclick="scrollToTop()">
            <i class="fas fa-arrow-up"></i>
        </button>
        <button class="floating-btn" onclick="scrollToBottom()">
            <i class="fas fa-arrow-down"></i>
        </button>
    </div>

    <script>
        // 滚动到顶部
        function scrollToTop() {
            window.scrollTo({ top: 0, behavior: 'smooth' });
        }

        // 滚动到底部
        function scrollToBottom() {
            window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' });
        }

        // 按钮点击效果
        document.querySelectorAll('.btn').forEach(btn => {
            btn.addEventListener('click', function () {
                const type = this.querySelector('span').textContent;
                let message = '';

                if (type === '返回首页') {
                    message = '即将返回首页';
                } else if (type === '重考列表') {
                    message = '即将打开重考列表';
                } else if (type === '下载成绩单') {
                    message = '成绩单下载中...';
                }

                if (message) {
                    alert(message);
                }
            });
        });

        // 页面加载时初始化
        window.onload = function () {
            console.log('考试结果页面加载完成');
        };
    </script>
</body>

</html>